package com.xuan.system.manager;


import com.xuan.common.core.constants.CacheConstants;
import com.xuan.common.redis.service.RedisService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

@Component
public class QuestionCacheManager {

    @Resource
    private RedisService redisService;


    public void addCache(Long questionId) {
        redisService.leftPushForList(CacheConstants.QUESTION_LIST_KEY, questionId);
    }

    public void deleteCache(Long questionId) {
        redisService.removeForList(CacheConstants.QUESTION_LIST_KEY, questionId);
    }
}
